//
//  PingteAccuracyView.m
//  兼职页面
//
//  Created by kuiyuan liang on 2021/5/26.
//

#import "PingteAccuracyView.h"
#import "CommonUtil.h"


@interface PingteAccuracyView()
@property (strong, nonatomic) UILabel * leftLabel1;
@property (strong, nonatomic) UILabel * leftLabel2;
@property (strong, nonatomic) UILabel * leftLabel3;
@property (strong, nonatomic) UILabel * leftLabel4;

@property (strong, nonatomic) UILabel * centerLabel1;
@property (strong, nonatomic) UILabel * centerLabel2;
@property (strong, nonatomic) UILabel * centerLabel3;
@property (strong, nonatomic) UILabel * centerLabel4;

@property (strong, nonatomic) UILabel * rightLabel1;
@property (strong, nonatomic) UILabel * rightLabel2;
@property (strong, nonatomic) UILabel * rightLabel3;
@property (strong, nonatomic) UILabel * rightLabel4;


@property (strong, nonatomic) UIView * line1;
@property (strong, nonatomic) UIView * line2;
@property (strong, nonatomic) UIView * line3;
@property (strong, nonatomic) UIView * line4;


@end

@implementation PingteAccuracyView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
        self.layer.cornerRadius = AD(8);
        self.layer.borderColor = [UIColor whiteColor].CGColor;
        self.layer.borderWidth = AD(1);
        
        [self addSubview:self.leftLabel1];
        [self addSubview:self.leftLabel2];
        [self addSubview:self.leftLabel3];
        [self addSubview:self.leftLabel4];
        
        [self addSubview:self.centerLabel1];
        [self addSubview:self.centerLabel2];
        [self addSubview:self.centerLabel3];
        [self addSubview:self.centerLabel4];
        
        [self addSubview:self.rightLabel1];
        [self addSubview:self.rightLabel2];
        [self addSubview:self.rightLabel3];
        [self addSubview:self.rightLabel4];
        
        [self addSubview:self.line1];
        [self addSubview:self.line2];
        [self addSubview:self.line3];
        [self addSubview:self.line4];
        
    }
    return self;
}


-(UILabel *)leftLabel1{
    if (!_leftLabel1) {
        _leftLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.width/3, AD(30))];
        _leftLabel1.font = [UIFont boldSystemFontOfSize:AD(16)];
        _leftLabel1.textColor = [UIColor whiteColor];
        _leftLabel1.text = @"平特一肖";
        _leftLabel1.textAlignment = NSTextAlignmentCenter;
    }
    return _leftLabel1;
}

-(UILabel *)leftLabel2{
    if (!_leftLabel2) {
        _leftLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(0, _leftLabel1.bottom, self.width/3, AD(20))];
        _leftLabel2.font = [UIFont boldSystemFontOfSize:AD(13)];
        _leftLabel2.textColor = [UIColor whiteColor];
        _leftLabel2.text = @"类型";
        _leftLabel2.textAlignment = NSTextAlignmentCenter;
    }
    return _leftLabel2;
}

-(UILabel *)leftLabel3{
    if (!_leftLabel3) {
        _leftLabel3 = [[UILabel alloc] initWithFrame:CGRectMake(0, _leftLabel2.bottom, self.width/3, AD(20))];
        _leftLabel3.font = [UIFont boldSystemFontOfSize:AD(13)];
        _leftLabel3.textColor = [UIColor whiteColor];
        _leftLabel3.text = @"1";
        _leftLabel3.textAlignment = NSTextAlignmentCenter;
    }
    return _leftLabel3;
}

-(UILabel *)leftLabel4{
    if (!_leftLabel4) {
        _leftLabel4 = [[UILabel alloc] initWithFrame:CGRectMake(0, _leftLabel3.bottom, self.width/3, AD(30))];
        _leftLabel4.font = [UIFont boldSystemFontOfSize:AD(14)];
        _leftLabel4.textColor = [UIColor whiteColor];
        _leftLabel4.text = @"最多连错";
        _leftLabel4.textAlignment = NSTextAlignmentCenter;
    }
    return _leftLabel4;
}




-(UILabel *)centerLabel1{
    if (!_centerLabel1) {
        _centerLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(_leftLabel1.right, 0, self.width/3, AD(30))];
        _centerLabel1.font = [UIFont boldSystemFontOfSize:AD(16)];
        _centerLabel1.textColor = [UIColor whiteColor];
        _centerLabel1.text = @"100%";
        _centerLabel1.textAlignment = NSTextAlignmentCenter;
    }
    return _centerLabel1;
}

-(UILabel *)centerLabel2{
    if (!_centerLabel2) {
        _centerLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(_leftLabel1.right, _leftLabel1.bottom, self.width/3, AD(20))];
        _centerLabel2.font = [UIFont boldSystemFontOfSize:AD(13)];
        _centerLabel2.textColor = [UIColor whiteColor];
        _centerLabel2.text = @"正确率";
        _centerLabel2.textAlignment = NSTextAlignmentCenter;
    }
    return _centerLabel2;
}

-(UILabel *)centerLabel3{
    if (!_centerLabel3) {
        _centerLabel3 = [[UILabel alloc] initWithFrame:CGRectMake(_leftLabel1.right, _leftLabel2.bottom, self.width/3, AD(20))];
        _centerLabel3.font = [UIFont boldSystemFontOfSize:AD(13)];
        _centerLabel3.textColor = [UIColor whiteColor];
        _centerLabel3.text = @"0";
        _centerLabel3.textAlignment = NSTextAlignmentCenter;
    }
    return _centerLabel3;
}

-(UILabel *)centerLabel4{
    if (!_centerLabel4) {
        _centerLabel4 = [[UILabel alloc] initWithFrame:CGRectMake(_leftLabel1.right, _leftLabel3.bottom, self.width/3, AD(30))];
        _centerLabel4.font = [UIFont boldSystemFontOfSize:AD(14)];
        _centerLabel4.textColor = [UIColor whiteColor];
        _centerLabel4.text = @"当前连对";
        _centerLabel4.textAlignment = NSTextAlignmentCenter;
    }
    return _centerLabel4;
}



-(UILabel *)rightLabel1{
    if (!_rightLabel1) {
        _rightLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(_centerLabel1.right, 0, self.width/3, AD(30))];
        _rightLabel1.font = [UIFont boldSystemFontOfSize:AD(16)];
        _rightLabel1.textColor = [UIColor whiteColor];
        _rightLabel1.text = @"1对1";
        _rightLabel1.textAlignment = NSTextAlignmentCenter;
    }
    return _rightLabel1;
}

-(UILabel *)rightLabel2{
    if (!_rightLabel2) {
        _rightLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(_centerLabel1.right, _leftLabel1.bottom, self.width/3, AD(20))];
        _rightLabel2.font = [UIFont boldSystemFontOfSize:AD(13)];
        _rightLabel2.textColor = [UIColor whiteColor];
        _rightLabel2.text = @"类型";
        _rightLabel2.textAlignment = NSTextAlignmentCenter;
    }
    return _rightLabel2;
}

-(UILabel *)rightLabel3{
    if (!_rightLabel3) {
        _rightLabel3 = [[UILabel alloc] initWithFrame:CGRectMake(_centerLabel1.right, _leftLabel2.bottom, self.width/3, AD(20))];
        _rightLabel3.font = [UIFont boldSystemFontOfSize:AD(13)];
        _rightLabel3.textColor = [UIColor whiteColor];
        _rightLabel3.text = @"1";
        _rightLabel3.textAlignment = NSTextAlignmentCenter;
    }
    return _rightLabel3;
}

-(UILabel *)rightLabel4{
    if (!_rightLabel4) {
        _rightLabel4 = [[UILabel alloc] initWithFrame:CGRectMake(_centerLabel1.right, _leftLabel3.bottom, self.width/3, AD(30))];
        _rightLabel4.font = [UIFont boldSystemFontOfSize:AD(14)];
        _rightLabel4.textColor = [UIColor whiteColor];
        _rightLabel4.text = @"最多连对";
        _rightLabel4.textAlignment = NSTextAlignmentCenter;
    }
    return _rightLabel4;
}

-(UIView *)line1{
    if (!_line1) {
        _line1 = [[UIView alloc] initWithFrame:CGRectMake(_leftLabel1.right, AD(10), AD(1), AD(30))];
        _line1.backgroundColor = [UIColor whiteColor];
    }
    return _line1;
}

-(UIView *)line2{
    if (!_line2) {
        _line2 = [[UIView alloc] initWithFrame:CGRectMake(_leftLabel1.right, AD(60), AD(1), AD(30))];
        _line2.backgroundColor = [UIColor whiteColor];
    }
    return _line2;
}

-(UIView *)line3{
    if (!_line3) {
        _line3 = [[UIView alloc] initWithFrame:CGRectMake(_centerLabel1.right, AD(10), AD(1), AD(30))];
        _line3.backgroundColor = [UIColor whiteColor];
    }
    return _line3;
}

-(UIView *)line4{
    if (!_line4) {
        _line4 = [[UIView alloc] initWithFrame:CGRectMake(_centerLabel1.right, AD(60), AD(1), AD(30))];
        _line4.backgroundColor = [UIColor whiteColor];
    }
    return _line4;
}



@end
